#define _CRT_SECURE_NO_WARNINGS 1
#include"sort.h"

void test1()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	InsertSort(a, n);
	PrintArray(a, n);
}

void test2()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	BubbleSort(a, n);
	PrintArray(a, n);
}

void test3()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	HeapSort(a, n);
	PrintArray(a, n);
}

void test4()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	SelectSort(a, n);
	PrintArray(a, n);
}

void test5()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	ShellSort(a, n);
	PrintArray(a, n);
}

void test6()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	QuickSort1(a, 0, n - 1);
	PrintArray(a, n);
}

void test7()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	QuickSort2(a, 0, n - 1);
	PrintArray(a, n);
}

void test8()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	QuickSortNonr(a, n);
	PrintArray(a, n);
}

void test9()
{
	int a[] = { 4,3,6,8,1,5,8,9,3,1,6,3,1,6,7,12,34,25 };
	int n = sizeof(a) / sizeof(a[0]);
	MergeSort(a, n);
	PrintArray(a, n);
}

void test10()
{
	int a[] = { 3,6,8,1,5,8,9,10,20,18,29,15,28,19,23,10,39,49 };
	int n = sizeof(a) / sizeof(a[0]);
	MergeSortNonr(a, n);
	PrintArray(a, n);
}

void test11()
{
	int a[] = { 3,6,8,1,5,8,9,10,20,18,29,15,28,19,23,10,39,49 };
	int n = sizeof(a) / sizeof(a[0]);
	CountSort(a, n);
	PrintArray(a, n);
}

void test12()
{
	int a[] = { 3,6,8,1,5,8,9,10,20,18,29,15,28,19,23,10,39,49 };
	int n = sizeof(a) / sizeof(a[0]);
	QuickSort_three(a, 0, n - 1);
	PrintArray(a, n);
}
int main()
{
	test1();
	test2();
	test3();
	test4();
	test5();
	test6();
	test7();
	test8();
	test9();
	test10();
	test11();
	test12();
	return 0;
}